/**
 * Created by Administrator on 2015/4/29.
 */
var data = [
    {
        title: 'artTitle',
        content: 'content<br/>contentcontent<br/>contentcontent<br/>contentcontent<br/>contentcontent<br/>contentcontent<br/>contentcontent<br/>contentcontent<br/>contentcontent<br/>contentcontent<br/>content',
        link: 1,
        commentsNum: 10,
        author: 'admin',
        authorId: 1,
        date: '2015-4-30',
        catalogs: [{catalog: 'c1'}, {catalog: 'c2'}],
        tags: [{tag: 't1'}, {tag: 't2'}]
    },
    {title: 'artTitle', content: 'content<br/>content', link: 2, commentsNum: 10},
    {title: 'artTitle', content: 'content<br/>content', link: 3, commentsNum: 10}
];
module.exports = {
    index: function (req, res) {
        res.render('index', {articles: data});
    },
    article: function (req, res, id) {
        res.render('article', {article: data[id-1]});
    }
};
